Deprecate gtk_application_add_accelerator
authorMatthias Clasen <mclasen@redhat.com>
Sun, 6 Apr 2014 06:13:06 +0000 (02:13 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 6 Apr 2014 06:13:06 +0000 (02:13 -0400)
The new gtk_application_set_accels_for_action api is more flexible
and better.

gtk/gtkapplication.c
gtk/gtkapplication.h

index 1022037eb6c777757f34eacfbbb3df2e5eb8714e..a074e9ebfb390190b05f3ab7363ee7197a6addf1 100644 (file)
@@ -668,8 +668,10 @@ extract_accel_from_menu_item (GMenuModel     *model,
     }
   g_object_unref (iter);
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   if (accel && action)
     gtk_application_add_accelerator (app, accel, action, target);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   if (target)
     g_variant_unref (target);
@@ -1075,6 +1077,8 @@ gtk_application_update_accels (GtkApplication *application)
  * than calling this function for each accelerator.
  *
  * Since: 3.4
+ *
+ * Deprecated: 3.14: Use gtk_application_set_accels_for_action() instead
  */
 void
 gtk_application_add_accelerator (GtkApplication *application,
@@ -1107,6 +1111,8 @@ gtk_application_add_accelerator (GtkApplication *application,
  * with gtk_application_add_accelerator().
  *
  * Since: 3.4
+ *
+ * Deprecated: 3.14: Use gtk_application_set_accels_for_action() instead
  */
 void
 gtk_application_remove_accelerator (GtkApplication *application,
index c08f2dc37367d4288237d839e3ce065e8e6759dd..7ff13ad44b458ebe3b721525b2dd06d818e4cd2f 100644 (file)
@@ -101,12 +101,13 @@ GDK_AVAILABLE_IN_3_4
 void             gtk_application_set_menubar   (GtkApplication    *application,
                                                 GMenuModel        *menubar);
 
-GDK_AVAILABLE_IN_3_4
+GDK_DEPRECATED_IN_3_14_FOR(gtk_application_set_accels_for_action)
 void             gtk_application_add_accelerator    (GtkApplication  *application,
                                                      const gchar     *accelerator,
                                                      const gchar     *action_name,
                                                      GVariant        *parameter);
-GDK_AVAILABLE_IN_3_4
+
+GDK_DEPRECATED_IN_3_14_FOR(gtk_application_set_accels_for_action)
 void             gtk_application_remove_accelerator (GtkApplication *application,
                                                      const gchar    *action_name,
                                                      GVariant       *parameter);